# Maintainer: Santiago Torres-Arias <santiago@archlinux.org>

pkgname=xcalib
pkgver=0.10
pkgrel=3
pkgdesc="Load 'vcgt'-tag profiles to X-server on the calibration stage"
arch=('loong64' 'x86_64')
url="https://github.com/OpenICC/xcalib"
license=('GPL2' 'custom:postcardware')
depends=('libxxf86vm' 'libxrandr')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('67dbf2dcc4ae67fde48b48630980c1fa6f89fda5810347f616ec85094c274055')

build() {
	cd "$pkgname-$pkgver"
	make
}

package() {
	cd "$pkgname-$pkgver"
    install -m755 -Dt "${pkgdir}/usr/bin" "xcalib" 
    install -m644 -Dt "${pkgdir}/usr/share/man/man1/" "xcalib.1" 
    install -m644 -Dt "${pkgdir}/usr/share/xcalib" *.icc
    install -m644 -Dt "${pkgdir}/usr/share/pixmaps/${pkgname}.ico" "icon.ico"

    # postcardware license stuff :)
    install -m644 -Dt "${pkgdir}/usr/share/licenses/xcalib/" "README.md"
    

}
